package com.lznAdmin.security.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;

/**
 * @program: lzn-manage-parent
 * @description: 指定中文提示信息
 * @author: lzn
 * @create: 2021-07-29 09:23
 **/
@Configuration
public class ReloadMessageConfig {

    @Bean  // 加载中文的认证提示信息
    public ReloadableResourceBundleMessageSource messageSource() {
        ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();

        messageSource.setBasename("classpath:org/springframework/security/messages_zh_CN");

        return messageSource;
    }
}
